/PROG  PNS0003
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "P0001916";
PROG_SIZE	= 3348;
CREATE		= DATE 22-07-11  TIME 10:45:12;
MODIFIED	= DATE 24-11-08  TIME 11:29:58;
FILE_NAME	= PNS0072;
VERSION		= 0;
LINE_COUNT	= 120;
MEMORY_SIZE	= 3804;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R34 ;
   6:  !  PROGRAM: PNS0003 ;
   7:  !  PART:P0001916  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.2    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:   ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  27:   ;
  28:  R[1:CYCLE TOTAL]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5:SPEED           ] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  38:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  39:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  40:  R[8:R MOVE TIME]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON,JMP LBL[25] ;
  48:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:  WAIT DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON    ;
  53:   ;
  54:  TIMER[3]=START ;
  55:  OVERRIDE=R[5:SPEED           ] ;
  56:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  57:   ;
  58:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  59:  PAYLOAD[2] ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:J P[5:PICK DEPART] 100% CNT50 ACC100 TA R[20]sec,DO[5:TO R23 DROP START]=PULSE,1.0sec    ;
  63:  DO[8:P3 PARTS OUT]=PULSE,1.0sec ;
  64:  LBL[27] ;
  65:  IF DI[9:VACUUM ON L]=OFF OR DI[11:VACUUM ON R]=OFF,JMP LBL[27] ;
  66:   ;
  67:   ;
  68:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  69:   ;
  70:   ;
  71:  LBL[30:GOTO DROP POUNCE] ;
  72:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  73:   ;
  74:  TIMER[3]=STOP ;
  75:  LBL[40:AT DROP POUNCE] ;
  76:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  77:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P4 DROP ENTRY]=ON,JMP LBL[50] ;
  78:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  79:  JMP LBL[40] ;
  80:   ;
  81:  LBL[50:MOVE DROP SNEAK] ;
  82:  TIMER[3]=START ;
  83:  OVERRIDE=R[5:SPEED           ] ;
  84:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  85:  LBL[51:DROP OR C-P-S] ;
  86:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  87:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  88:  JMP LBL[51] ;
  89:  JMP LBL[50] ;
  90:   ;
  91:  LBL[60:MOVE CLS-PRS-ACC] ;
  92:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  93:  PAUSE ;
  94:  JMP LBL[30] ;
  95:   ;
  96:  LBL[80:DROP ENABLED] ;
  97:  TIMER[3]=START ;
  98:  !PROCEED TO DROP ;
  99:  OVERRIDE=R[5:SPEED           ] ;
 100:J P[10:DROP APPROACH] 100% CNT80 ACC100    ;
 101:  MONITOR END Z_CHECH ;
 102:J P[11:DROP] 100% CNT10 TB R[19]sec,CALL PARTDROP ACC100    ;
 103:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 104:  PAYLOAD[1] ;
 105:  CALL CHK_DROP    ;
 106:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 107:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 108:  !GOTO PICK POUNCE ;
 109:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 110:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 111:  JMP LBL[10] ;
 112:   ;
 113:  LBL[90:END OF CYCLE] ;
 114:  TIMER[1]=STOP ;
 115:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 116:  MONITOR END MON_PICK ;
 117:J P[1:MIDDLE] 50% CNT100    ;
 118:  MOVE TO HOME    ;
 119:   ;
 120:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z = -1111.822  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2133.841  mm,	Y =  1452.038  mm,	Z =  -932.495  mm,
	W =   179.254 deg,	P =     -.477 deg,	R =   147.310 deg,
	E1=   138.327 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2633.448  mm,	Y =  3257.253  mm,	Z =  -999.916  mm,
	W =  -179.191 deg,	P =    -1.645 deg,	R =    91.321 deg,
	E1=   195.273 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2633.448  mm,	Y =  3257.252  mm,	Z = -1158.956  mm,
	W =  -179.191 deg,	P =    -1.645 deg,	R =    91.321 deg,
	E1=   195.273 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2633.448  mm,	Y =  3257.252  mm,	Z =  -934.155  mm,
	W =  -179.191 deg,	P =    -1.645 deg,	R =    91.321 deg,
	E1=   195.273 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2135.764  mm,	Y =  1198.637  mm,	Z =  -849.686  mm,
	W =   179.706 deg,	P =      .439 deg,	R =   153.073 deg,
	E1=   132.574 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2119.002  mm,	Y = -1045.556  mm,	Z =  -920.109  mm,
	W =  -179.256 deg,	P =      .262 deg,	R =  -158.618 deg,
	E1=    84.304 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2301.740  mm,	Y = -2435.865  mm,	Z =  -945.175  mm,
	W =  -179.304 deg,	P =     -.433 deg,	R =  -127.200 deg,
	E1=    53.007 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2675.386  mm,	Y = -3265.147  mm,	Z = -1058.545  mm,
	W =  -179.052 deg,	P =     -.054 deg,	R =   -89.932 deg,
	E1=    16.703 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2675.387  mm,	Y = -3265.148  mm,	Z = -1157.904  mm,
	W =  -179.052 deg,	P =     -.054 deg,	R =   -89.932 deg,
	E1=    16.703 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2675.386  mm,	Y = -3265.147  mm,	Z = -1058.545  mm,
	W =  -179.052 deg,	P =     -.054 deg,	R =   -89.932 deg,
	E1=    16.703 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2202.877  mm,	Y = -1344.119  mm,	Z = -1097.901  mm,
	W =  -178.656 deg,	P =      .224 deg,	R =  -148.819 deg,
	E1=    74.117 deg
};
/END
